package com.zmn.plat.services.impl.msg.receive.position.conf;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.zmn.plat.model.entity.msg.receive.position.conf.MsgReceivePositionConf;
import com.zmn.plat.model.entity.msg.receive.position.conf.MsgReceivePositionConfQuery;
import com.zmn.plat.model.vo.msg.receive.position.conf.OrgPermitTreeVO;
import com.zmn.plat.persistence.interfaces.msg.receive.position.conf.MsgReceivePositionConfDao;
import com.zmn.plat.services.interfaces.msg.receive.position.conf.MsgReceivePositionConfService;

@Service
public class MsgReceivePositionConfServiceImpl implements MsgReceivePositionConfService {

    @Resource
    MsgReceivePositionConfDao msgReceivePositionConfDao;

    @Override
    public MsgReceivePositionConf findByKey(Integer id) {
        return msgReceivePositionConfDao.findByKey(id);
    }

    @Override
    public List<OrgPermitTreeVO> listOrgPermitTreeVOByMsgId(Integer msgId) {
        return msgReceivePositionConfDao.listOrgPermitTreeVOByMsgId(msgId);
    }

    @Override
    public List<MsgReceivePositionConf> listPageByQuery(MsgReceivePositionConfQuery query) {
        int count = countByQuery(query);
        query.setTotalCount(count);
        return msgReceivePositionConfDao.listPageByQuery(query);
    }

    @Override
    public List<MsgReceivePositionConf> listByQuery(MsgReceivePositionConfQuery query) {
        return msgReceivePositionConfDao.listByQuery(query);
    }

    @Override
    public List<MsgReceivePositionConf> listAll() {
        return msgReceivePositionConfDao.listAll();
    }

    @Override
    public Integer countByQuery(MsgReceivePositionConfQuery query) {
        return msgReceivePositionConfDao.countByQuery(query);
    }

    @Override
    public Integer updateByKey(MsgReceivePositionConf msgReceivePositionConf) {
        return msgReceivePositionConfDao.updateByKey(msgReceivePositionConf);
    }

    @Override
    public Integer insert(MsgReceivePositionConf msgReceivePositionConf) {
        return msgReceivePositionConfDao.insert(msgReceivePositionConf);
    }

    @Override
    public Integer insertBatch(List<MsgReceivePositionConf> msgReceivePositionConfs) {
        return msgReceivePositionConfDao.insertBatch(msgReceivePositionConfs);
    }

    @Override
    public Integer deleteByKey(Integer id) {
        return msgReceivePositionConfDao.deleteByKey(id);
    }

    @Override
    public Integer deleteByMsgId(Integer msgId) {
        return msgReceivePositionConfDao.deleteByMsgId(msgId);
    }
}